import * as actionTypes from './constants';

const defaultstate = {
    classifyList:[],
    classifyRecommand:{},
    classifySecondMenu:[]
}

const reducer = (state = defaultstate, action) => {
    switch (action.type) {
        case actionTypes.SET_CLASSIFY_LIST:
            return {
                ...state,
                classifyList:action.data
            }
        case actionTypes.SET_CLASSIFY_REOCOMMAND:
            return {
                ...state,
                classifyRecommand:action.data
            }
        case actionTypes.SET_CLASSIFY_SECOND_MENU:
            return {
                ...state,
                classifySecondMenu:action.data
            }
        default:
            return state;
    }
}
export default reducer;